<?php 
include_once("../public/head.php");
$id=$_GET['id'];
include_once('../../public/function.php');
$config = include_once('../../public/config.php');
$result=aselect($config,'wenzhang',$id );
var_dump($result);

 ?>
<!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="../index.php">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="./wenzhang.php">文章管理</a><span class="crumb-step">&gt;</span><span>编辑文章</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">

                <form action="doupdate.php" method="post" enctype="multipart/form-data">
                    <table class="insert-tab" width="100%">
                        <tbody><tr>
             
                        </tr>
                            
                         
                            <tr>
                                <th><i class="require-red">*</i>所属分类：</th>
                                 <input  type="hidden" value="<?php echo $id; ?>" name="id">
                                <td>
                                    
                                    <select name="sort" id="">
                                    <option value="0" <?php echo $result[0]['sort']=="0"?'selected':''?> >全部分类</option>
                                    <option value="1" <?php echo $result[0]['sort']=="1"?'selected':''?>>PHP学习</option>
                                    <option value="2" <?php echo $result[0]['sort']=="2"?'selected':''?>>娱乐八卦</option>
                                    <option value="3" <?php echo $result[0]['sort']=="3"?'selected':''?>>大学生活</option>
                                    <option value="4" <?php echo $result[0]['sort']=="4"?'selected':''?>>历史</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>文章标题：</th>
                                <td>
                                    <input class="common-text required" id="title" name="title" size="50" value="<?php echo $result[0]['title'] ?>" type="text">
                                </td>
                            </tr>
                            
                            <tr>
                                <th>文章内容：</th>
                                <td>
                            <!-- 加载编辑器的容器 -->
                            <script id="baidu" name="content" type="text/plain" style="width: 1000px;">
                                <?php echo $result[0]['content'] ?>
                            </script>
                            </td>
                            </tr>

                             <tr>
                                <th><i class="require-red">*</i>文章标签：</th>
                                <td>
                                    <input class="common-text required" id="title" name="" size="50" value="" type="text">
                                </td>
                            </tr>
                         
                          <tr>
                                <th><i class="require-reg">*</i>状态：</th>
                                <td>
                                    <input class="" id="title" name="status" size="50" value="1" type="radio" <?php echo $result[0]['status']=="1"?'checked':''?>>普通文本
                                    <input class="" id="" name="status" size="50" value="2" type="radio" <?php echo $result[0]['status']=="2"?'checked':''?>>加精文本
                                </td>
                            </tr>


                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                    <!-- 配置文件 -->
                    <script type="text/javascript" src="../../public/baidu/ueditor.config.js"></script>
                    <!-- 编辑器源码文件 -->
                    <script type="text/javascript" src="../../public/baidu/ueditor.all.js"></script>
                    <!-- 实例化编辑器 -->
                    <script type="text/javascript">
                        var ue = UE.getEditor('baidu');
                    </script>
                </form>
            </div>
        </div>

    </div>
    <!--/main-->

    <?php 
       include_once("../public/end.php")
     ?>